package com.freewater.cargotracker.domain.model.voyage;

import com.github.meixuesong.aggregatepersistence.Aggregate;

import java.util.List;

public interface VoyageRepository {

    void save(Voyage voyage);

    void save(Aggregate<Voyage> voyageAggregate);

    Voyage findById(Long id);

    Aggregate<Voyage> findAggregateById(Long id);

    Voyage findByVoyageNumber(VoyageNumber voyageNumber);

    Aggregate<Voyage> findAggregateByVoyageNumber(VoyageNumber voyageNumber);

    List<Voyage> findAll();

    double findBookedCargoSize(Long voyageId);
}
